package com.huanxing.cloud.promotion.api.feign;

import com.huanxing.cloud.common.core.constant.SecurityConstants;
import com.huanxing.cloud.common.core.constant.ServiceNameConstants;
import com.huanxing.cloud.common.core.util.Result;
import com.huanxing.cloud.promotion.api.dto.CouponUserReqDTO;
import com.huanxing.cloud.promotion.api.vo.CouponUserRespVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteCouponUserService", value = ServiceNameConstants.PROMOTION_SERVICE)
public interface RemoteCouponUserService {

	/**
	 * 修改用户优惠券状态
	 * @param couponUserReqDTO
	 * @param source
	 * @return
	 */
	@PostMapping("/app/couponuser/update/status")
	Result<Boolean> updateCouponUserStatus(CouponUserReqDTO couponUserReqDTO,
			@RequestHeader(SecurityConstants.SOURCE) String source);

	/**
	 * 查询用户优惠券信息
	 * @param id
	 * @param source
	 * @return
	 */
	@GetMapping("/app/couponuser/{id}")
	Result<CouponUserRespVO> getById(@PathVariable("id") String id,
			@RequestHeader(SecurityConstants.SOURCE) String source);

}
